package com.common.utility;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

/**
 * Created by mark on 15/3/18.
 * Intent 动作类
 */
public class IntentUtils {

    /**
     * 直接拨号
     * @param context
     * @param number
     */
    public static final void call(Context context,String number){
        Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel://" + number));
        context.startActivity(intent);
    }

    /**
     * 跳转到拨号界面，不发起呼叫
     * @param context
     * @param number
     */
    public static final void dial(Context context,String number){
        Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel://" + number));
        context.startActivity(intent);
    }
}
